import React, { useEffect } from 'react';
import { View, Image } from '@tarojs/components';
import Taro from '@tarojs/taro';
import styles from './index.less';
import logoUrl from '@/assets/food-default.png';
import { inject, observer } from 'mobx-react';
import type { UserStore } from '@/store/types';

const Login = inject('userStore')(observer(({ userStore }: { userStore: UserStore }) => {

  return (
    <View className={styles.page}>
      <View className={styles.loginBox}>
        <Image src={logoUrl} className={styles.logo} />
        <View className={styles.loginButton} onClick={userStore.handleLogin}>
          登录</View>
        <View className={styles.tip}>注：该小程序不会主动获取您的手机号、微信昵称、头像等信息，请放心使用</View>
      </View>
    </View>
  );
}));

export default Login;
